
<%@ page import="eudjok.SetList" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'setList.label', default: 'SetList')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
       <div id="navegacao">
           	 	<div class="homePagePanel">
           	     	<div class="panelTop"></div>
           	     	<div class="panelBody" id="panelBody">
           	        	 <g:render template="/common/perfil/Dj" />
           	     	</div>
           	    	 <div class="panelBtm"></div>
           		 </div>
        	</div>
			
				
			<div id="centroLivre">
            <table style="width: 700px;">
			<thead>
			<h2 class="pretoPrincipal">Setlist ${fieldValue(bean: setListInstance, field: "titulo")}</h2>
			
            <!--<g:if test="${flash.message}">
				<div class="message">${flash.message}</div>
            </g:if>-->
            
			</thead>
			
			<tbody>
			<tr>
			<td>
				<div class="nav">
					<table>
						<tbody>
						
							
							<tr class="prop">
								<td valign="top" class="name"><g:message code="setList.titulo.label" default="Titulo" /></td>
								
								<td valign="top" class="value">${fieldValue(bean: setListInstance, field: "titulo")}</td>
								
							</tr>
							
							
							<tr class="prop">
								<td valign="top" class="name"><g:message code="setList.estilo.label" default="Estilo" /></td>
								
								<td valign="top" class="value"><g:link controller="estilo" action="show" id="${setListInstance?.estilo?.id}">${setListInstance?.estilo?.encodeAsHTML()}</g:link></td>
								
							</tr>
						
							<tr class="prop">
								<td valign="top" class="name"><g:message code="setList.dataCriacao.label" default="Data de Criacao" /></td>
								
								<td valign="top" class="value"><g:formatDate format="dd/MM/yyyy" date="${setListInstance?.dataCriacao}" /></td>
								
							</tr>
						
							<tr class="prop">
								<td valign="top" class="name"><g:message code="setList.ultimaAtualizacao.label" default="Atualizacao" /></td>
								
								<td valign="top" class="value"><g:formatDate format="dd/MM/yyyy" date="${setListInstance?.ultimaAtualizacao}" /></td>
								
							</tr>
							
							<tr class="prop">
								<td valign="top" class="name"><g:message code="setList.visitas.label" default="Visitas" /></td>
								
								<td valign="top" class="value">${fieldValue(bean: setListInstance, field: "visitas")}</td>
								
							</tr>
						
							<tr class="prop">
								<td valign="top" class="name"><g:message code="setList.publica.label" default="Publica" /></td>
								
								<td valign="top" class="value">
									${fieldValue(bean: setListInstance, field: "publica")}</td>
								
							</tr>
						
						</tbody>
					</table>
				</div>
				<br/>
				<g:if test="${playList[0] == null}">
						<h2>Playlist vazia!</h2>
					</g:if>
					<h2><g:link class="create" controller="youTube" action="buscarSL" params="[setListId:setListInstance.id]" >Adicione agora um vídeo</g:link></h2>
				<div id="video">
						
					<g:if test="${playList[0] != null}">
						<iframe title="YouTube video player" class="youtube-player" type="text/html" width="470" height="340"  
								src="http://www.youtube.com/embed/${playList[0].url}?autoplay=0" frameborder="0">
						</iframe>
					</g:if>
					
				</div>
			</td>
			
			<!-- td>
				<div id="direita">
					<div id="playlist">
						<g:render template="/common/perfil/homePlaylist" />
					</div>
				</div>				
            </td -->
			</tr>
			</tbody>
			</table>
			</div>
		</div>
			
			<div class="buttons">
                <g:form>
                    <g:hiddenField name="id" value="${setListInstance?.id}" />
                    <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
					<span class="menubutton"><g:link class="create" controller="youTube" action="buscarSL" params="[setListId:setListInstance.id]" > + Musica </g:link></span>
				</g:form>
            </div>
		</div>
    </body>
</html>
